﻿using System;
using TickSharp.Core.Interfaces;

namespace TickSharp.Core.Infrastructure
{
    public class ApiConnectionInfo : IApiConnectionInfo
    {
        private readonly string _password;
        private readonly string _projectDomain;
        private readonly string _userName;

        public ApiConnectionInfo(string projectDomain, string userName, string password)
        {
            _projectDomain = projectDomain;
            _userName = userName;
            _password = password;
        }

        public string ProjectDomain
        {
            get { return _projectDomain; }
        }

        public string UserName
        {
            get { return _userName; }
        }

        public string Password
        {
            get { return _password; }
        }

        public string AuthenticationQueryString()
        {
            return String.Format("email={0}&password={1}", UserName, Password);
        }
    }
}